<?php

namespace app\admin\controller\examples;

use Throwable;
use app\common\controller\Backend;

/**
 * 腾讯地图位置（经纬度）选择示例
 */
class Tencentmap extends Backend
{
    /**
     * Tencentmap模型对象
     * @var object
     * @phpstan-var \app\admin\model\examples\Tencentmap
     */
    protected object $model;

    protected array|string $preExcludeFields = ['id', 'create_time', 'update_time'];

    protected string|array $quickSearchField = ['id'];

    public function initialize(): void
    {
        parent::initialize();
        $this->model = new \app\admin\model\examples\Tencentmap;
    }

    /**
     * 获取系统配置中的腾讯地图key
     * @throws Throwable
     */
    public function getTencentmapKey(): void
    {
        $key = get_sys_config('tencentmap_key');
        $this->success('success', $key);
    }

}